<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

    <script type="text/javascript">
        $(function(){
            $("#dg5").datagrid({
                url:"${pageContext.request.contextPath}/guru/getGuruByPage",
                title:"音频章节列表",
                width:500,
                pagination:true,//如果为true，显示分页工具栏。默认为false
                onDblClickRow:function(rowIndex,rowData){
                    $("#updateGuruDiv").dialog("open");
                    $("#updateGuruName").val(rowData.guruName);
                    $("#id").val(rowData.guruId);  //
                },
                loadMsg:"拼命加载中...",
                toolbar:"#myToolbar5",//在<div>标签上定义工具栏
                columns:[[    //表格相当于二维数组，
                    {title:"编号",field:"guruId",checkbox:true},
                    {title:"上师名",field:"guruName"},
                    {title:"法号",field:"guruNickName"},
                    {title:"头像",field:"cc",
                        formatter:function(value,rowData,rowIndex){
                          return "<img src='${pageContext.request.contextPath}/"+rowData.guruImage+"' width=\"40\" height=\"20\">";
                        }
                    },
                    {title:"操作",field:"cz",
                        formatter:function(value,rowData,rowIndex){
                            return "<a href='javascript:void(0)'  >修改</a>";
                        }
                    }
                ]]
            });
        });
    </script>

<table id="dg5"></table>




